// src/utils/axios.js
import axios from 'axios';

const instance = axios.create({
    baseURL: 'https://api.moonshot.cn/v1', // Kimi API的基础URL
    headers: {
        'Content-Type': 'application/json'
    }
});

// 添加请求拦截器，设置Authorization头部
instance.interceptors.request.use(config => {
    config.headers['Authorization'] = `Bearer sk-2Qosld6FxeMO3MbTkcakI2gzlZHRpEiTj8xTsGghEvtvScLb`; // 替换为你的Kimi API密钥
    return config;
}, error => {
    return Promise.reject(error);
});

export default instance;